Data processing system and method with data sharing for the same

ABSTRACT

If relocation of a table with a high reference frequency is made possible, the database management method and system are arranged to improve performance according to the number of increased nodes and accumulate a reference frequency of each external storage unit allocated to each database management node. A data storage area for storing the table with a high reference frequency, located in the external storage unit, is specified as a shared data area to be referenced by plural nodes. The system is controlled to cause the nodes to refer to the shared table stored in the shared data area on any timing in parallel. This prevents load from being concentrated onto the node allocated to the data area.

CROSS-REFERENCE TO RELATED APPLICATION

This application is a continuation of U.S. application Ser. No.10/930,765, filed Sep. 1, 2004, which application claims priority fromJapanese application JP2004-157619 filed on May 27, 2004, the content ofwhich is hereby incorporated by reference into this application.

BACKGROUND OF THE INVENTION

The present invention relates to a data processing system and methodwhich are arranged to keep loads at data processing nodes well-balancedas much as possible.

As a method of accessing data in a database system composed of pluralnodes, conventionally, two methods, that is, a shared database approachand a shared nothing database approach are disclosed in Sohan DeMel,“Oracle9i Real Application Clusters—Cache Fusion Delivers Scalability,”Oracle White Paper, Oracle Corporation, pages 7 to 9 and 12 to 13, May2001.

The shared database approach method is arranged to allow each of thenodes to evenly make access to all data. Hence, this method makes itpossible to uniformly distribute load among the nodes. This method,however, requires synchronous update among the nodes, which brings aboutoverheads such as an I/O process of reading data again and an inter-nodecommunication for synchronous control.

On the other hand, the shared nothing database approach method permitseach of the nodes to make access to only a data area allocated to eachnode itself. Hence, if the data location is shifted, the load is focusedon one or some nodes. However, this method does not require thesynchronous control among the nodes, so that the nodes may be operatedin parallel.

SUMMARY OF THE INVENTION

Both of the foregoing conventional methods allow the load burdened tothe nodes to be distributed by increasing the nodes in number, for thepurpose of improving the performance. However, the shared databaseapproach method involves a disadvantage that the performance of the netincreased nodes cannot be improved because the overhead is increasedwith the increase of the nodes. Further, the shared nothing databaseapproach method also requires proper relocation of data according to thenumber of the increased nodes. In actual, however, if the table with ahigh reference frequency cannot be relocated by the division or thelike, the load is concentrated on the node where that table with a highreference frequency is located. It means that it is impossible toimprove the performance according to the number of the increased nodes.This is the disadvantage of the latter method.

The foregoing problem involved by the shared database approach methodmay be solved by the following method. That is, if two or more nodesmake access to the same data, the transfer of the data from a cache ofthe node to be synchronized to a cache of another node results ineliminating the necessity of the quite costly I/O process, therebysuppressing the increase of the overhead.

However, up to date, the foregoing problem involved by the sharednothing database approach method cannot be solved by any effectivemeans.

It is therefore an object of the present invention to keep the loads atplural database processing nodes well-balanced as much as possible.

According to an aspect of the present invention, in carrying out theobject, a method for managing a database arranged so that each of thedatabase management nodes may make access to only a table in a data areaallocated to the accessing node itself, characterized in that a tablewith a high reference frequency, selected from the tables of the dataareas allocated to those nodes, may be specified as a shared table to bereferenced by those database management nodes.

The present invention is effective in keeping the load at the databasemanagement nodes well-balanced as much as possible.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram showing an arrangement of a database systemaccording to a first embodiment of the present invention;

FIG. 2 is a view showing a composition of table information;

FIG. 3 is a flowchart for illustrating a processing operation of anoperating or application or control node included in the firstembodiment of the present invention;

FIG. 4 is a flowchart for illustrating a processing operation of adatabase management node included in the first embodiment of the presentinvention;

FIG. 5 is an explanatory view showing an executing process of theapplication included in the first embodiment of the present invention;

FIG. 6 is a block diagram showing an arrangement of a database systemaccording to a second embodiment of the present invention;

FIG. 7 is a flowchart for illustrating a processing operation of anoperating node included in the second embodiment of the presentinvention;

FIG. 8 is a flowchart for illustrating a processing operation of adatabase management node included in the second embodiment of thepresent invention;

FIG. 9 is a block diagram for explaining a third embodiment of thepresent invention which is arranged to collect a reference frequency ofeach table and then to dynamically switch the table into a shared tableor vice versa; and

FIG. 10 is a view showing an example of table reference information.

DESCRIPTION OF THE EMBODIMENTS

Hereafter, the embodiments of the database management method and systemaccording to the present invention will be described in detail withreference to the appended drawings.

FIG. 1 is a block diagram showing an exemplary arrangement of a databasesystem according to a first embodiment of the present invention. In FIG.1, a reference number 1 denotes an application program (including abusiness program and an object, a process or a thread realizing thefunction of the program). A reference number 2 a denotes an operating orapplication or control node. Reference numbers 3 b to 3 d denote tables.Reference numbers 4 b to 4 d denote database management nodes. Referencenumbers 5 a to 5 d denote main storage units. A reference number 6denotes a data access request control unit (that may be realized by aprogram, or an object, a process or a thread for realizing the functionof the program, or hardware). Reference numbers 7 b to 7 d denote dataaccess control units (that may be realized by a program, or an object, aprocess or a thread for realizing the function of the program, orhardware), Reference numbers 8 b to 8 d denote cache memories (simplyreferred to as caches). A reference number 9 denotes an external storageunit. Reference numbers 10 b to 10 d denote data areas (that may bereferred also to as a data saving area or a data storage area). Areference number 11 denotes table information. Reference numbers 12 a to12 d denote table information control units (that may be realized by aprogram, or an object, a process or a thread for realizing the functionof the program, or hardware). In the database system to be described asthe first embodiment of the present invention, in principle, each of thedatabase management nodes may make access to a data area (for storing adatabase) allocated to the accessing node itself but may not make accessto any data area allocated to any other node. In general, it is adatabase management system called a shared nothing database approach.

The database system according to the first embodiment of the presentinvention includes the operating node 2 a that executes the applicationprogram 1, a plurality of data areas 10 b to 10 d, the external storageunit 9 in which the tables 3 b to 3 d composing the database are storedin the data areas respectively, and a plurality of database managementnodes 5 b to 4 d that make access to the tables 3 b to 3 d by executingthe application program 1. In this embodiment, the divisional parts ofthe database are called the tables. They may be referred to as a partialtable, a partial database, a divisional table, a divisional database, orthe like. Moreover, the database may be simply called a table. Theoperating node 2 a includes the application program 1 in the mainstorage unit 5 a inside the node 2 a itself and the data access requestcontrol unit 6 that accepts a request from the application program 1 anddistributes a data access request into a proper one of the databasemanagement nodes 4 b to 4 d. In this embodiment, the operating node 2 aor the database management nodes 4 b to 4 d may be realized by aninformation processing apparatus, a logical server, a program, anobject, a process, a thread, or a hardware unit. Further, the databasemanagement nodes 4 b to 4 d may be realized by a database managementprogram or a database management apparatus. The data access controlunits 7 b to 7 d may be realized by a program, an object, a process, athread, or a hardware unit.

The database management nodes 4 b to 4 d include data access controlunits 7 b to 7 d, each of which accepts the request from the data accessrequest control unit 6 of the operating node 2 a on the correspondingone of the main storage units 5 b to 5 d and makes access to thecorresponding one of the tables 3 b to 3 d allocated to the node 2 aitself. The data access control units 7 b to 7 d make access to thetables 3 b to 3 d through the caches 8 b to 8 d and then hold the readdata on the cache 8 b to 8 d, respectively. The data areas 10 b to 10 dproperly partitioned on the external storage unit 9 correspond with thedatabase management nodes 4 b to 4 d, respectively. These data areas 10b to 10 d may be referred by all the database management nodes 4 b to 4d. On each of the data areas 10 b to 10 d is created the correspondingone of the tables 3 b to 3 d, all of which compose the database. Thetables 3 b to 3 d are permitted to be accessed by only the databasemanagement nodes 4 b to 4 d to which the created data areas 10 b to 10are allocated respectively.

In the first embodiment of the present invention, the data areaallocated to any database management node may be specified as a shareddata area that permits reference from any other database managementnode. However, only the database management node to which the data areais allocated is permitted to update the data. In the first embodiment ofthe invention as shown in FIG. 1, the data area 10 c allocated to thedatabase is specified as the shared data area, which may be referred bythe database management node 4 b. The data area 10 c specified as theshared data area is a data area in which the table with a high referencefrequency is created. The table is specified as the shared table. In theembodiment shown in FIG. 1, the table 3 c is specified as the sharedtable. Then, on each of the main storage units 5 a to 5 d of all thenodes is created table information that includes the information as towhether or not each table is the shared table, the database managementnode allocated thereto, and the reference-permitted database managementnode(s). In the main storage units 5 a to 5 d, the table informationcontrol units 12 a to 12 d are provided for accessing the tableinformation.

In the foregoing first embodiment of the present invention, theoperating node 2 a and the database management nodes 4 b to 4 d may bethe ordinary information processing apparatus such as well-knownworkstations or PCs each provided with a CPU (not shown). Then, theexecution of the program through the CPU makes it possible to composevarious kinds of function units (to be discussed below) required by thisembodiment of the invention. Further, the operating node 2 a and thedatabase management nodes 4 b to 4 d or the database management nodes 4b to 4 d may be totally assumed as the virtual computer and built in thecomputer system composed by one hardware unit. This holds true to theother embodiments of the invention to be discussed below.

FIG. 2 shows an exemplary composition of the table information 11. Thetable information 11 includes a table name 13 positioned as a key, aninformation item 14 as to whether or not the table is the shared table,an information item 15 of the allocated database management node, and aninformation item 16 as to the database management node(s) to bereferenced.

FIG. 3 is a flowchart for illustrating the processing operation of theoperating node in the first embodiment of the present invention. Thisprocessing operation will be described below.

(1) In the operating node 2, when the application program 1 requests adatabase access from the data access request control unit 6, the dataaccess request control unit 6 performs a data access request controlprocess, requests the table 11 of the target table from the tableinformation control unit 12 a, and obtains the table information 11(step S1).

(2) The data access request control unit 6 determines whether or not thetarget table is the shared table based on the obtained table information11 and, if not, issues an access request to the data access control unitof the allocated database management node (steps S4 and S5).

(3) If the target table is the shared table in the determination of thestep S4, the data access request control unit 6 determines if the typeof the process to be requested is a reference or an update. If it is therequest for reference, the data access request control unit 6 selectsany database management node matched to the condition of the request forreference from the database management nodes to be referenced, for thecase shown in FIG. 1, the database management node 4 b or 4 c, andissues a request of an access for reference to the data access controlunit of the selected database management node (steps S6 to S8).

(4) If the type of request is a request for update in the determinationof the step S6, the data access request control unit 6 loops all thedatabase management nodes to be referenced, selects the databasemanagement node having issued no access request, and then issues arequest of an access for update to the data access control unit 7 of theselected database management node (steps S9 to S11).

FIG. 4 is a flowchart for illustrating the processing operation of thedatabase management node included in the first embodiment of the presentinvention. Then, this processing operation will be described below. Theprocess to be described is a process having been described withreference to FIG. 3, that is, a process of the database management nodehaving accepted the access request.

(1) The data access control unit of the database management node thathas been requested to be accessed performs a data access controlprocess. At first, it is determined if the type of the requested processis a reference or an update (step S12).

(2) If the type of the requested process is a request for reference inthe determination of the step S12, the data access request control unitdetermines whether or not the data requested for the cache of the nodeto which the unit belongs has been already read in the cache. If therequested data has been already read in the cache, the data accessrequest control unit gives back the result based on the read data to therequester (steps S13 and S15).

(3) If the data requested for the cache has not been read in the cachein the determination of the step S13, the data access request controlunit reads the data requested for the cache from the target table or theshared table and saves the data in the cache. Then, the control unitgives back the result based on the saved data to the requester (stepsS14 and S15).

(4) If the type of the requested process is a request for update in thedetermination of the step S12, the data access request control unitdetermines if the data requested to be updated has been already read inthe cache. If the data requested to be updated has been already read inthe cache, the requested update is reflected on the data saved in thecache (steps S16 and S18).

(5) If the data requested to be updated has not been read in the cachein the determination of the step S16, the data access request controlunit reads the data requested to be updated from the target table or theshared table and saves the data in the cache. The requested update isreflected on the data saved in the cache (steps S17 and S18).

(6) In succession, the data access request control unit requests thetable information 11 of the target table from the table informationcontrol unit 12 and then obtains the table information 11 (step S19).

(7) The data access control unit determines whether or not the targettable is the shared table based on the obtained table information. If itis not the shared table, the data updated in the cache is outputted tothe table of the data area (steps S22 and S23).

(8) If the target table is the shared table in the determination of thestep S22, the data access request control unit determines whether or notthe database management node to which the control unit belongs is thedatabase management node to which the shared data area is allocated(step S24).

(9) If it is the database management node to which the shared data areais allocated in the determination of the step S24, the data updated inthe cache is outputted to the shared data area. If it is not, nothing isexecuted (steps S23 and S25).

According to the first embodiment of the present invention, by executingthe foregoing process, in the case of requesting reference to the sharedtable, the operating node enables to distribute the request into thedata access control unit of any database management node in theprocesses of the steps S7 and S8. If the shared table is a table to befrequently referenced, this process allows the process of reference tobe executed from any database management node permitted to refer to theshared table. This prevents the process from being concentrated on thespecific database management node.

In a case that the shared table is required to be updated, by issuing anupdate to the data access control unit of every database management nodepermitted to refer to the shared table through the processes of thesteps S9, S10 and S11, the operation is executed to update the datastored in the shared table of the shared data area and the data storedin the cache of every database management node permitted to refer to theshared table.

For the database of the shared database approach, only the cache of thenode having executed the update is updated. Hence, if the reference isgiven from another node, an I/O process takes place for reading the datafrom the disk again. In this case, in order to guarantee no node beingupdated for the purpose of preventing the read of the data beingupdated, the inter-node communication for synchronous control takesplace. That is, the database of the shared database approach bringsabout various kinds of overheads when the plural nodes make access tothe same table.

As will be understood from the above description, the databasemanagement method and system according to the first embodiment of theinvention are arranged to constantly reflect all the update requestsonto the data of the cache of every database management node permittedto refer to the shared table, eliminate the necessity of reading thedata from the disk again, and prevent occurrence of any I/O process.Moreover, for preventing the read of the data being updated, the methodand system are merely required to guarantee that the database managementnode required to be referenced is not being updated. This guarantee thusdoes not depend on the state of any other database management node. Itmeans that no inter-node communication for synchronous control takesplace.

As such, the database management method and system according to thefirst embodiment of the invention allow plural database management nodesto make access to the shared table without any overhead. This makes itpossible for the database management nodes to refer to and update thedata in parallel only if the new database management node(s) are addedto the reference-permitted node(s) for improving the performance. Itresults in no increase of overhead, thereby improving the correspondingperformance with the increased number of the database management nodes.

FIG. 5 is a view for explaining the execution of the application program(simply referred to as the application) in the aforementioned firstembodiment of the present invention. In turn, the concrete processhaving been described with reference to FIGS. 1 to 4 will be describedwith reference to FIG. 5.

It is assumed that an application a17, an application b18, anapplication c19, an application d20, and an application e21 are executedin the operating node 2 a. The applications a17, b18, d20 and e21 areexecuted to refer to the shared table c23 allocated to the databasemanagement node c22. The application c19 is executed to update the dataof the shared table c23 into “20”. The shared table c23 permits thedatabase management nodes b24 and c22 to refer to the table c23 itself.Before executing the foregoing applications, the data “10” is enteredinto the shared table c23 but is not still read into the cache memoriesb25 and c26 provided in the database management nodes b24 and c22respectively.

At first, it is assumed that the applications a17 and b18 are executedin succession so that the request for reference given by theapplicationa 17 is distributed into the database management node b24 andthe request for reference given by the application b18 is distributedinto the database management node. In this case, the request forreference given by the application a17 causes the data “10” to be readinto the cache b25 of the database management node b24 and the result tobe given back to the application a17 itself. In parallel to thisprocess, the request for reference given by the application b18 causesthe data “10” to be read into the cache c26 of the database managementnode c22 and the result to be given back to the application b18.Afterwards, if the application for referring to the shared table c22 isexecuted, the data “10” stored in the cache of any distributed databasemanagement node is given back to that node itself.

Afterwards, the application cl9 is executed to issue a request forchanging the data of the shared table c23 from “10” into “20”, when theoperating node 2 a issues a request for update to both of the databasemanagement nodes b24 and c22. The database management node b24 updatesthe data stored in the cache b25 from “10” to “20”. Further, thedatabase management node c22 updates the data stored in the cache c26from “10” into “20” and then outputs the updated data into the sharedtable c23. As described above, the data stored in the cache of everydatabase management node is updated.

Then, it is assumed that the applications d20 and e21 are executed insuccession, the request for reference given by the application d20 isdistributed into the database management node b24, and the request forreference given by the application e21 is distributed into the databasemanagement node c22. In this case, the data “20” stored in the cache b25of the database management node b24 is given back to the request forreference given by the application d20. In parallel to this process, thedata “20” stored in the cache c26 of the database management node c22 isgiven back to the request for reference given by the application e21. Ifthe application for referring to the shared table c23 is executedsubsequently to the above, the data “20” stored in the cache of anydistributed database management node is given back to that application.

As has been understood from the foregoing description, according to thefirst embodiment of the invention, if the application for updating theshared table is executed while the application for referring to theshared table c23 is executed repetitively, the operation is executed toupdate the data stored in the cache of every database management nodeduring the execution of each application. Hence, even if the applicationhaving issued the request for reference is distributed into any databasemanagement node, the proper data may be given back to that applicationwithout having to execute the synchronous control with the update atanother database management node and read the data again.

According to the foregoing first embodiment of the present invention,the data management system and method are arranged to store the tables 3b to 3 d in the data areas 10 b to 10 d located on the external storageunit 9 respectively and read the data in the caches 8 b to 8 d of thedatabase management nodes 4 b to 4 d respectively. The database systemof the first embodiment arranged as described above makes it possiblefor plural database management nodes to refer to the shared table 3 c.Then, the read data is saved in the cache of every data management nodepermitted to refer to the shared table 3 c.

In the first embodiment of the present invention, therefore, in the caseof updating the data for synchronous control between the databasemanagement nodes, it is necessary to update the data stored in the cacheof every database management node permitted to refer to the shared table3 c to be updated through the processes of the steps S9 to S11 shown inFIG. 3 and of the steps S16 to S18 shown in FIG. 4. Further, also in thefirst embodiment, it is necessary to control the database managementnode 4 for actually updating the shared table 3 c located on theexternal storage unit 9 through the processes of the steps S19 to S25shown in FIG. 4.

FIG. 6 is a block diagram showing an exemplary arrangement of thedatabase system according to the second embodiment of the presentinvention. In FIG. 6, reference numbers 27 b to 27 d denote caches of anexternal storage unit. A reference number 28 denotes a cache controlunit of the external storage unit. The other reference numbers denotethe same components as those shown in FIG. 1. The database systemaccording to the below-described second embodiment of the presentinvention is arranged to eliminate the necessity of the synchronouscontrol between the database management nodes in the foregoing firstembodiment of the present invention.

The second embodiment shown in FIG. 6 is different from the firstembodiment in location of the caches 27 b to 27 d in the externalstorage unit 9 in place of the cache located in each database managementunit as in the first embodiment and in provision of new tableinformation 35 having a table name 35 and a database management nodename 37 for managing the correspondence between the table. The otherarrangement of the second embodiment is the same as that of the firstembodiment.

The external storage unit cache memories 27 b to 27 d (simply referredto as the external caches) located in the external storage unit areallocated to the data areas 10 b to 10 d respectively. The externalcache control unit 28 manages the allocating correspondence between theexternal cache memories 27 b to 27 d and the data areas 10 b to 10 d andrefers to or updates the data of the proper external caches 27 b to 27 dto the data areas 10 b to 10 d requested to be referenced or updated bythe database management nodes 4 b to 4 d. Further, on the predeterminedoccasion, the external cache control unit 28 reflects the data updatedby the external cache memories 27 b to 27 d onto the data areas 10 b to10 d allocated to those caches 27 b to 27 respectively. Thepredetermined occasion indicates the times such as when the updated dataof each of the external cache memories 27 b to 27 d reaches thepredetermined amount, when the updating times reach the given times, thepredetermined interval of time, or when a request from the databasemanagement nodes 4 b to 4 d or a command from the external to theexternal storage unit 9 is inputted. When the database management nodes4 b to 4 d refer to the tables 3 b to 3 d, the external cache controlunit 28 operates to read the data into the external caches 27 b to 27 dallocated to the data areas 10 b to 10 d where the tables 3 b to 3 d arestored and then stores the data therein. Then, the external cachecontrol unit 28 causes the external caches 27 b to 27 d to refer to thedatabase management nodes 4 b to 34 d.

In this case, the external cache control unit 28 obtains the allocatingrelation between the database management node and the table stored inthe external storage unit 10 by referring to the table information 35.In this embodiment, the table 3 d is allocated to the databasemanagement node 4 d. The table 3 c is allocated to the databasemanagement nodes 4 b and 4 c. That is, when the external cache controlunit 28 receives an access request from the database management node 4d, the external cache control unit 28 refers to the table information 35and executes the process based on the access request received about thetable 3 d corresponding with the database management node 4 d. Further,when the database management nodes 4 b to 4 d updates the tables 3 b to3 d, the external cache control unit 28 updates the data held in theexternal cache memories 27 b to 27 d allocated to the data areas 10 b to10 d for storing the tables 3 b to 3 d. Hence, any one of the databasemanagement nodes 4 b to 4 d may refer to and update the data stored inthe external cache memories 27 b to 27 d if requested. Further, on thepredetermined occasion, the external cache control unit 28 updates thedata areas 10 b to 10 d allocated to the external cache memories 27 b to27 d with the data updated in the external cache memories 27 b to 27 d.The database management nodes 4 b to 4 d thus do not require control ofan output of the updated data to the data areas 10 b to 10 d.

In the foregoing second embodiment of the present invention, thedatabase management nodes 4 b to 4 d may directly refer to and updatethe data stored in the external cache memories 27 b to 27 d through theexternal cache control unit 28. Hence, the database management nodes 4 bto 4 d does not need to hold the data in the cache of each node. Thiseliminates the necessity of updating the data stored in the cachememories 8 b to 8 d of all the database management nodes 4 b to 4 dpermitted to refer to the shared table 3 c to be updated, the updatehaving been executed for synchronous control among the databasemanagement nodes 4 b to 4 d. Further, it is not necessary to control thedatabase management node 4 c for actually updating the shared table 3 clocated in the external storage unit 9. The second embodiment of thepresent invention does not need the foregoing control, which makes itpossible to make access to the table more quickly.

FIG. 7 is a flowchart for illustrating the operating process of theoperating node included in the second embodiment of the presentinvention. Then, the description will be oriented to the operatingprocess of this node.

In the flow shown in FIG. 7, the process from the steps S1 to S8 isidentical with the process from the steps S1 to S8 shown in FIG. 3. Inthe second embodiment of the present invention, it is not necessary toexecute the process of updating the data stored in the cache of everydatabase management node permitted to refer to the shared table 3 c tobe updated, which process has been executed in the process from thesteps S9 to S11 having been described in the flow of FIG. 3. Hence, inthe case of requesting the update for the shared table 3 c, theoperation is executed to select any database management node for theupdate process (step S26) and request the data access control unit ofthe selected database management node to access the shared table 3 c(step S27).

FIG. 8 is a flowchart for illustrating the operating process of thedatabase management node included in the second embodiment of thepresent invention. Then, the description will be oriented to theoperating process. The process described herein concerns with theprocess having been described with reference to FIG. 7, concretely, theprocess of the database management node having accepted an accessrequest.

In the flow of FIG. 8, the process of the steps S12 to S18 is identicalwith the process of the steps S12 to S18 having been described along theflow of FIG. 4. In the second embodiment of the invention, the systemdoes not need the process of controlling the database management node 4c for actually updating the shared table 3 c located on the externalstorage unit 9. In the flow of FIG. 4, the process having been executedin the steps S19 to S25. Hence, after the process of the step 18 isexecuted to update the data stored in the external cache 27 c, theexternal cache control unit 28 updates the data area 10 c. This meansthat the database management node has nothing to do (step S28).

As described above, according to the second embodiment of the presentinvention, the system provides a capability of allocating the cache ontoeach partitioned data area located on the external storage unit andassociating the allocated cache with the external storage unit that canbe directly controlled by the database management node. This capabilitymakes it possible to execute the application more fast.

As described above, in the first and the second embodiments of thepresent invention, the load may be distributed by specifying the tablewith a high reference frequency as the shared table. However, the systemis required to search the reference frequency of the table or study thechange of the reference frequency as predicating the change of the usingstatus of the table. Further, the system is required to determine if thetable is specified as the shared table on the promotional level.

Hence, for the purpose of reducing the burden in the search and study ofdetermining if the table is specified as the shared table, the systemmay have a capability of monitoring the referring status of the table inthe execution of the application and dynamically determining if thetable is specified as the shared table.

FIG. 9 is an explanatory view showing the third embodiment of thepresent invention which makes it possible to collect a referencefrequency of each table and dynamically determine if the table isspecified as the shared table according to the reference frequency ofthe table. Then, the description will be oriented to the thirdembodiment of the present invention. In FIG. 9, a reference number 29denotes a table reference monitoring and shared table switching controlunit. A reference number 30 denotes table reference information. Theother reference numbers indicate the same components as those of FIG. 1.FIG. 9 shows only the portion required for the description herein. Theoverall arrangement is the same as that shown in FIG. 1 or 6.

In the third embodiment of the present invention shown in FIG. 9, thedata management method and system are arranged to add to the operatingnode 2 a the table reference monitoring and shared table switchingcontrol unit 29 (simply referred to as the monitoring and switchingunit) for monitoring the access to the tables 3 b to 3 d (FIG. 1 or 6)to be executed by the application 1 of the operating node 2 a,determining if the table is specified as the shared table, and switchingthe table into the shared table if specified. When the application 1requires the access to the tables 3 b to 3 d, the data access requestcontrol unit 6 inevitably issues the request for referring to the tableinformation 11 to the table information control unit 12 a. In response,the data access request control unit 6 notifies the monitoring andswitching unit 29 of the request for reference. Then, the monitoring andswitching unit 29 saves each reference frequency of the tables 3 b to 3d in the table reference information 30.

FIG. 10 shows an exemplary composition of the table referenceinformation 30. The table reference information 30 includes a referencefrequency threshold value 31 on which the table is switched into theshared table, pre-specified by the system or the user, and the referencefrequencies 33 of the tables 3 b to 3 d with the tale name 32 as a key.

The monitoring and switching unit 29 calculates each reference frequencyof the tables 3 b to 3 d based on the notice sent from the data accessrequest control unit 6 and occasionally updates the reference frequencyinformation 33 of the tables 3 b to 3 d of the table referenceinformation 30. Further, the monitoring and switching unit 29 constantlymonitors this value. If this value exceeds the threshold value 31 onwhich each of the tables 3 b to 3 d is switched into the shared table,the monitoring and switching unit 29 notifies the table informationcontrol unit 12 a of every node so that the table with the greater valuethan the threshold value 31 is switched into the shared table, while ifthe shared table lowers the value, the shared table is switched into theordinary table. The table information control unit 12 a updates theinformation 14 (FIG. 2) as to whether or not the concerned table name isthe shared table in the table information 11 and the reference-permitteddatabase management node(s) 16 (FIG. 2).

In a case that the switch of the table into the shared table is notifiedto the table information control unit 12 a (FIG. 1), the tableinformation control unit 12 a operates to specify the information 14FIG. 2) as to whether or not the concerned table name 13 (FIG. 2) isgiven to the shared table as YES and then to add to thereference-permitted database management nodes 16 (FIG. 2) the databasemanagement node permitted to refer to the shared table. Further, in acase that the switch of the shared table into the ordinary table isnotified to the table information control unit 12, the table informationcontrol unit 12 a operates to specify the information 14 as to whetheror not the concerned table name 13 is given to the shared table as NOand then update the reference-permitted database management nodes 16 toonly the allocated database management node(s). Later, the accessrequest from the application 1 is made to be the switched tableinformation 11 (FIG. 1) given back from the table information controlunit 12 a when the data access request control unit 6 determines if thetable is the shared table. The table information control 12 a isoperated according to the switched table information 11.

As described above, according to the third embodiment of the presentinvention, the data management method and system are arranged todynamically switch the ordinary table into the shared one or vice versaaccording to the reference frequency of the table. If the referencefrequency of the table is increased, the load is distributed with thetable as the shared table. On the other hand, if the reference frequencyof the shared table is decreased, the shared table is switched into theordinary table. This operation makes it possible to eliminate the user'snecessity of relocating the table(s) and studying if the table isswitched into the shared table according to the using status of thetable.

Each process included in each foregoing embodiment of the presentinvention may be composed of a processing program, which may be suppliedas being saved in a recording medium such as a HD (harddisk), a DAT(digital audio tape), a FD (floppy disk), a MO (magneto-optical) disk, aDVD-ROM (digital versatile disk-read-only memory), or a CD-ROM (compactdisk-read-only memory).

As described above, the first embodiment of the present inventionconcerns with the database system in which each of the databasemanagement nodes is permitted to make access to only the data areaallocated to each node. If the relocation of the table with a highreference frequency is not made possible by division or the like, thetable may be specified as the shared table. Hence, any node may makeaccess to the shared table on any timing, so that the performance of thedatabase system may be improved according to the number of the increasednodes.

Moreover, according to the second embodiment of the present invention,the database management method and system are arranged to allocate thecache onto each partitioned data area located on the external storageunit so that the corresponding node may directly control the cache. Thisthus makes it possible to realize a far faster access to the database.

Moreover, according to the third embodiment of the present invention,the database management method and system are arranged to monitor thereferring status of the table by the application and dynamically switchthe table into the shared table or vice versa according to the referencefrequency of the table. This thus makes it possible to lessen the user'sburden in studying the tables for determining if one table is switchedto the shared table.

It should be further understood by those skilled in the art thatalthough the foregoing description has been made on embodiments of theinvention, the invention is not limited thereto and various changes andmodifications may be made without departing from the spirit of theinvention and the scope of the appended claims.

1. A database management method for management of a plurality ofdatabase management nodes, comprising the steps of: making an access toa table having a data area allocated to each database management nodebut not to a table having a data area not allocated to each databasemanagement node in a shared nothing system in which each of saidplurality of database management nodes makes access to a table stored ina data area allocated to each database management node; calculatingaccess frequencies of said table stored in said data area allocated toeach of said plural database management nodes; determining if one ofsaid access frequencies is greater than or equal to a predeterminedvalue; and if one of said access frequencies is more than or equal tosaid predetermined value, re-allocating said table with the accessfrequency greater than or equal to the predetermined value as a sharedtable to be referenced by one or more database management nodes to whichsaid table with the access frequency is not allocated, for distributingload of said disk to said plural database management nodes.
 2. Thedatabase management method as claimed in claim 1, wherein said sharedtable is updated by the database management node to which said sharedtable is allocated, and when said shared table is updated, each of allthe database management nodes having a capability of referring to saidshared table operates to update data stored in a cache located in eachnode itself.
 3. The database management method as claimed in claim 1,wherein one or more tables and shared tables in data areas allocated tosaid database management nodes respectively are provided in each of saidpartitioned data areas located on an external storage unit, a cache isallocated to said external storage unit in a manner to correspond witheach of said tables and shared tables, and said cache is controlled bythe corresponding database management node.
 4. The database managementmethod as claimed in claim 1, further comprising steps of monitoring areferring status of each of said tables and shared tables located insaid data areas to which said database management nodes are allocatedrespectively and dynamically switching said table into said shared tableor vice versa according to the referring frequency of said table.
 5. Adatabase management system comprising: a plurality of databasemanagement nodes; and an external storage unit having data areas eachhaving a table; wherein a database management node makes an access to atable having a data area allocated to each database management node butnot to a table having a data area not allocated to each databasemanagement node in a shared nothing system in which each of saidplurality of database management nodes makes access to a table stored ina data area allocated to each database management node; wherein saiddatabase management node calculates access frequencies of said tablestored in said data area allocated to each of said plural databasemanagement nodes; wherein said database management node determines ifone of said access frequencies is greater than or equal to apredetermined value; and wherein said database management node, if it isdetermined that one of said access frequencies is greater than or equalto a predetermined value, re-allocates said table with the accessfrequency greater than or equal to the predetermined value as a sharedtable to be referenced by one or more database management nodes to whichsaid table with the access frequency is not allocated, for distributingload of said disk to said plural database management nodes.
 6. Thedatabase management system as claimed in claim 5, wherein said sharedtable is updated by the database management node to which said sharedtable is allocated, and when said shared table is updated, each of allthe database management nodes having a capability of referring to saidshared table operates to update data stored in a cache located in eachnode itself.
 7. The database management system as claimed in claim 5,wherein one or more tables and shared tables in data areas allocated tosaid database management nodes respectively are provided in each of saidpartitioned data areas located on an external storage unit, a cache isallocated to said external storage unit in a manner to correspond witheach of said tables and shared tables, and said cache is controlled bythe corresponding database management node.
 8. The database managementsystem as claimed in claim 5, wherein said database management nodemonitors a referring status of each of said tables and shared tableslocated in said data areas to which said database management nodes areallocated respectively and dynamically switching said table into saidshared table or vice versa according to the referring frequency of saidtable.
 9. A database management program for management of a plurality ofdatabase management nodes having computer readable codes arranged tofunction on a database management system, said management programcomprising the steps of: making an access to a table having a data areaallocated to each database management node but not to a table having adata area not allocated each database management node in a sharednothing system in which each of said plurality of database managementnodes makes access to a table stored in a data area allocated to eachdatabase management node; calculating access frequencies of said tablestored in said data area allocated to each of said plural databasemanagement nodes; determining if one of said access frequencies isgreater than or equal to a predetermined value; and if one of saidaccess frequencies is more than or equal to said predetermined value,re-allocating said table with the access frequency greater than or equalto the predetermined value as a shared table to be referenced by one ormore database management nodes to which said table with the accessfrequency is not allocated, for distributing load of said disk to saidplural database management nodes.
 10. The database management program asclaimed in claim 9, wherein said shared table is updated by the databasemanagement node to which said shared table is allocated, and when saidshared table is updated, each of all the database management nodeshaving a capability of referring to said shared table operates to updatedata stored in a cache located in each node itself.
 11. The databasemanagement program as claimed in claim 9, wherein one or more tables andshared tables in data areas allocated to said database management nodesrespectively are provided in each of said partitioned data areas locatedon an external storage unit, a cache is allocated to said externalstorage unit in a manner to correspond with each of said tables andshared tables, and said cache is controlled by the correspondingdatabase management node.
 12. The database management program as claimedin claim 9, further comprising steps of monitoring a referring status ofeach of said tables and shared tables located in said data areas towhich said database management nodes are allocated respectively anddynamically switching said table into said shared table or vice versaaccording to the referring frequency of said table.